<template>
	<view style="height: 60px;display: flex;justify-content: flex-end;align-items: center;">
		<image   src="../../image/neticon/gkj.png" style="width: 24px;height: 24px;"></image>
		<image v-show="isConnected"src="../../image/neticon/yd.png" style="width: 24px;height: 24px;padding: 0px 40px 0px 20px;"></image>
		<image v-show="!isConnected"src="../../image/neticon/yddk.png" style="width: 24px;height: 24px;padding: 0px 40px 0px 20px;"></image>
	</view>
</template>

<script>
	export default {
		name: "headView",
		data() {
			return {
        isConnected:true
			};
		},
    mounted() {
		  const that=this
      uni.onNetworkStatusChange(function(res) {
        //这里是断网和连接网络才会触发
        console.log('网络类型:' + res.networkType + ',网络连接:' + res.isConnected);
        that.isConnected= res.isConnected
      });
    }
  }
</script>

<style>

</style>
